/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ar.com.neolokura.travian.helper.bo.page;

import com.gargoylesoftware.htmlunit.html.HtmlButton;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import java.io.IOException;

/**
 *
 * @author gustavo
 */
public abstract class PageObject {

    private HtmlPage page;
    private HtmlButton submitButton;
    
    public PageObject(HtmlPage page) {
        this.page = page;
    }

    public HtmlPage getPageBySubmitButton() throws IOException{
        
        HtmlPage nextPage = submitButton.click();
        return nextPage;
    }
    
    public HtmlPage getPage() {
        return page;
    }

    public void setPage(HtmlPage page) {
        this.page = page;
    }

    public HtmlButton getSubmitButton() {
        return submitButton;
    }

    public void setSubmitButton(HtmlButton submitButton) {
        this.submitButton = submitButton;
    }
    
    
    
    
}
